]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
BluetoothStatus: hide the device separator if no devices are shown
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 21 Dec 2010 14:53:28 +0000 (15:53 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 6 Jan 2011 18:48:28 +0000 (19:48 +0100)
When BluetoothApplet::show-full-menu property is notified (when you
switch from a disabled adapter / no adapter to an active one), we
would show all the menu, including the device separator, without
checking if any devices actually existed.

https://bugzilla.gnome.org/show_bug.cgi?id=637690

js/ui/status/bluetooth.js

index 47a7ed288c353007333bfc069399b84c9ce85bf6..7a6206d11a2f1e42172898d0ddef953898672f9d 100644 (file)
@@ -267,7 +267,10 @@ Indicator.prototype = {
     _updateFullMenu: function() {
         if (this._applet.show_full_menu) {
             this._showAll(this._fullMenuItems);
-            this._showAll(this._deviceItems);
+            if (this._hasDevices)
+                this._showAll(this._deviceItems);
+            else
+                this._deviceSep.hide();
         } else {
             this._hideAll(this._fullMenuItems);
             this._hideAll(this._deviceItems);